<template>
  <div class="l-header">
    <a class="l-back" v-click="back"><i class="iconfont l-arrow">&#xe606;</i></a>
    <div v-if="title" class="l-tit">{{title}}</div>
    <slot/>
  </div>
</template>

<script>
export default {
  props: {
    title: String
  },
  methods: {
    back () {
      history.back()
    }
  }
}
</script>

<style scoped>
.l-header {
  height: 38px;
  background-color: #13b7f6;
  text-align: center;
  position: fixed;
  top:0;
  width: 100%;
  z-index: 1;
  .l-back {
    position: absolute;
    top: 0;
    left: 0;
    padding: 8px;
  }
  .l-arrow {

    font-size: 18px;
    color:#fff;
  }
  .l-tit {
    text-align: center;
    font-size: 18px;
    color: #fff;
    padding-top: 8px;
  }
}
</style>
